<!DOCTYPE html>
<html>
<head>
	<title>西南交通大学人事处投票系统客户端</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet"  href="css/themes/default/jquery.mobile-1.2.0.min.css" />
	<style type="text/css">
	.error{
		color:red;
	}
	</style>
</head>
<body>
	<div data-role="page" id="home">
	<div data-role="header">
		<h1 id="pagetitle">投票系统</h1>
	</div><!-- /header -->

  <p class="intro">系统正在加载数据,依网络状况的不同,大概需要1~5秒。</p>
  <form id="voteform">
	<div id="login">
		<label>
			<input type="text" name="login" placeholder="用户名" required="required" />
		</label>
		<label>
			<input type="text" name="password" placeholder="密码" required="required"/>
		</label>
		<button  type="button"   id="loginnow">登入</button>
	</div> 

	<script id="votesection-tpl" type="text/template">
	<div data-role="fieldcontain" id="section-<%= count%>">
	 <%  _.each(groups, function(group,i) {  %>
	 	<fieldset data-role="controlgroup" data-type="horizontal">
	 		<h2><%= group.title%>最多选择<%= group.max%>个人</h2> 
	 		<% _.each(group.candidates,function(candidate,j){%>
	 			<label><input type="checkbox" name="answer[<%= candidate.org%>][<%= candidate.name%>][votevalue]"  value="1" id="checkbox-<%= i%>" /> <img src="/images/photos/faff996ca372972f5cd8379be9386229.JPG"/>
	 				<br/><%= candidate.name%> - <%= candidate.org%>
	 			</label>
	    	<% });%>
	    </fieldset>
	 <% }); %>  
	 </div> 
	</script>

	<script id="marksection-tpl" type="text/template">
	<div data-role="fieldcontain" id="section-<%= count%>">
	 <%  _.each(groups, function(group,i) {  %>
	 	<fieldset data-role="controlgroup" >
	 		<h2><%= group.title%></h2> 
 				<% _.each(group.orgs,function(org,k){%>
 				<% if(!_.isNull(org)){%>
 					<br/><%= org.fullname%><br/>
 					<% _.each(group.questions,function(question,j){%>
						<br/><label for="markvalue<%= count%>-<%= i%>-<%= k%>-<%= j%>"><%= question.text%>:</label><br/>
   						<input type="range" name="answer[<%= org.fullname%>][<%= question.text%>][markvalue]" id="markvalue<%= count%>-<%= i%>-<%= k%>-<%= j%>" value="0" min="0" max="<%= question.weight%>"  data-highlight="true"/>
					<% });%>
 				<% }%>
	    	<% });%>
	    </fieldset>
	 <% }); %>  
	 </div>  
	</script>
	
  <script id="votesubmit-tpl" type="text/template">
	<button  type="button" data-theme="e" id="votesubmit">完毕，点此发送投票结果。</button>
  </script>
  <script id="votenow-tpl" type="text/template">
	<button  type="button"   id="votenow">开始</button>
  </script>


  </form>
   <script id="voteresult-tpl" type="text/template">
	状态：<%= status%>
  </script>

  	<script id="setting-tpl" type="text/template">
	<div data-role="fieldcontain" id="setting-form">
 
	 </div> 
	</script>


  </div>
	<script src="cordova-2.2.0.js"></script>
	<script src="js/jquery-1.6.2.min.js"></script> 
    <script src="js/jquery.mobile.min.js"></script> 
	<script src="js/underscore-min.js"></script>
	<script src="js/app.js"></script>
</body>
</html>
